<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<title>后台管理</title>
<link href="/assets/css/animate.min.css" rel="stylesheet">
<link href="/assets/css/bootstrap.min.css" rel="stylesheet">
<link href="/assets/css/materialdesignicons.min.css" rel="stylesheet">
<link rel="stylesheet" href="/assets/js/jquery-confirm/jquery-confirm.min.css?v=1">
<link href="/assets/css/style.min.css?v=20220712" rel="stylesheet">

<script src="/assets/js/jquery.min.js"></script>
<script type="text/javascript" src="/assets/js/bootstrap.min.js"></script>
<script src="/assets/js/bootstrap-notify.min.js"></script>
<script type="text/javascript" src="/assets/js/lyear-loading.js"></script>
<script type="text/javascript" src="/assets/js/lightyear.js"></script>
<script src="/assets/js/jquery-confirm/jquery-confirm.min.js"></script>
<script src="/assets/js/jquery.cookie.min.js"></script>
<script type="text/javascript" src="/assets/js/main.min.js?v=211"></script>
<style>
.lyear-wrapper {
    position: relative;
}
.lyear-login {
    display: flex !important;
    min-height: 100vh;
    align-items: center !important;
    justify-content: center !important;
}
.lyear-login:after{
    content:'';
    min-height:inherit;
    font-size:0;
}
.login-center {
    background: #fff;
    padding: 2.14286em 3.57143em;
    border-radius: 5px;
    margin: 2.85714em;
}
.login-header {
    margin-bottom: 1.5rem !important;
}
.login-center .has-feedback.feedback-left .form-control {
    padding-left: 38px;
    padding-right: 12px;
}
.login-center .has-feedback.feedback-left .form-control-feedback {
    left: 0;
    right: auto;
    width: 38px;
    height: 38px;
    line-height: 38px;
    z-index: 4;
    color: #dcdcdc;
}
.login-center .has-feedback.feedback-left.row .form-control-feedback {
    left: 15px;
}
</style>
</head>

<body>
<div class="lyear-layout-web">
  <div class="lyear-layout-container">
<div class="row lyear-wrapper">
  <div class="lyear-login">
    <div class="login-center">
      <div class="login-header text-center" style="font-size: 20px;font-weight: bold;">
后台管理
      </div>
      <form action="" method="post" onsubmit="return onFormSubmit()">
        <div class="mb-3 has-feedback feedback-left">
          <input type="text" placeholder="请输入账号" class="form-control" id="username" autocomplete="off" required="required">
        </div>
        <div class="mb-3 has-feedback feedback-left">
          <input type="password" placeholder="请输入密码" class="form-control" id="password"  autocomplete="off" required>
        </div>
        <div class="mb-3">
          <button class="btn btn-block btn-primary" style='margin: 20px auto 0;display: block;'>立即登录</button>
        </div>
      </form>
    </div>
  </div>
</div>
<script>
function onFormSubmit(){
	var data = {username:$.trim($('#username').val()),passwd:$.trim($('#password').val())};
	if(data['username'] == ''){
		showNotify('账号不能为空', 'danger', 100);
		return false;
	}
	if(data['password'] == ''){
		showNotify('密码不能为空', 'danger', 100);
		return false;
	}
	showLoading()
	$.ajax({
	    type: "POST",
	    url: "",
	    dataType:'json',
	    data:data,
	    success: function(res) {
	    	hideLoading();
	        if(res.code == 1){
	        	showNotify('登录成功', 'success', 2000, 'mdi mdi-emoticon-happy', 'top', 'center');
	        	setTimeout(function(){
	        		location.href = "/SPAdmin";
	        	},1500);
	        }else{
	        	$.alert(res.msg);
	        }
	    }
	});
    return false;
}
</script>
</div></div></body></html>